<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<html>
<head>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/validation.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" type="text/javascript"
	src="${ctx}/scripts/div/common.js"></script>
	<script type="text/javascript" src="${ctx}/scripts/tags/unitedselect/UnitedSelect.js"></script>
<title>阅签规则</title>
<script type="text/javascript">
	var closeVarTmp=null;
	function submitFun(closeVar){
		closeVarTmp = closeVar;
		
		var isPass=$('submitForm').fireEvent("onSubmit");
		if(isPass){
			closeORopenButton();
			var param = Form.serialize('submitForm');
			var url = "${ctx}/system_systemCustEventSignReadingRuleAction.do?method=edit";
			new Ajax.Request(url,{method: 'post',parameters :param ,onSuccess : showResponse});
		}
	}

	function showResponse(response){
		closeORopenButton();
		ajaxSubmitException(response.responseText);
		if(response.responseText == "true" ){
			if(closeVarTmp){
				closeWinAndRefresh();
			}
			else{
				
				location.reload();
			}
		}
	}

	function closeWinAndRefresh(){
		var iframe=findFrame('mainFrame');
	 
	     iframe.refresh();

		 windowClose();

	}


	//关闭或打开按钮事件
	function closeORopenButton(){
	//$('window_footer').disabled= !$('window_footer').disabled;
	<c:if test="${signReadingRuleVO.keyword == null}">
	$('btn1_42').disabled= !$('btn1_42').disabled;
	</c:if>
	$('btn1_22').disabled= !$('btn1_22').disabled;
	$('btn1_32').disabled= !$('btn1_32').disabled;
	}
</script>
</head>

<body onload="">
<form id="submitForm" name="submitForm" method="post" action="${ctx}/system_systemCustEventSignReadingRuleAction.do?method=edit" class="required-validate">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><span class="window_head_intext"><img src="${ctx}/images/ico_Advance.gif" align="absmiddle" />&nbsp;阅签规则设置</span></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  
  <tr>
    <td class="content">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outtable">  
  <tr>
    <td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">       
	  <tr>
        <td class="aux_outtable_color">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
		
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
         <tr>
            <td width="13%" class="aux_intable_td1">阅签规则名称：</td>
            <td width="13%" class="aux_intable_require"><input name="keyword" id="keyword" type="hidden" value="${signReadingRuleVO.keyword }" /><input name="name" id="name" type="text" validateUrl="${ctx}/system_systemCustEventSignReadingRuleAction.do?method=existsName" class="required inputtext validate-char <c:if test="${signReadingRuleVO.keyword == null}">validate-ajax</c:if>"  <c:if test="${signReadingRuleVO.keyword != null}">readonly="readonly"</c:if> value="${signReadingRuleVO.name }" size="16" /></td>
            </tr>
         <tr>
           <td valign="top" class="aux_intable_td1">备 注：</td>
           <td class="aux_intable_td2"><textarea name="remark" id="remark" cols="35" rows="3" class="textareatext validate-char">${signReadingRuleVO.remark }</textarea></td>		   
         </tr>
          <tr>
            <td class="aux_intable_td1">使用状态：</td>
            <td class="aux_intable_require"><label>
              <input type="radio" name="validity" <c:if test="${signReadingRuleVO.validity=='1' || signReadingRuleVO.validity==null }">checked="checked"</c:if> value="IS_USE" />
              在 用&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               
               <input type="radio" <c:if test="${signReadingRuleVO.validity=='0' }">checked="checked"</c:if> name="validity" value="IS_NOT_USE" /> 
              停 用
</label></td>
          </tr>
         
          <tr>
            <td class="aux_intable_td1">显示序号：</td>
            <td class="aux_intable_td2"><input name="sequence" id="sequence" type="text" class="inputtext int-range-0-999" maxlength="3" value="${signReadingRuleVO.sequence }" size="16" /></td>
            </tr>
          <tr>
            <td colspan="4" class="aux_titletable">约束条件</td>
            </tr>
          <tr>
            <td class="aux_intable_td1">事件性质：</td>
            <td class="aux_intable_td2">
			<pms:unitedSelect
	     		id="custEventNatureId"
	     		name="custEventNatureId"
	     		optionLabel="name"
	     		optionValue="keyword"
	     		selectText="请选择..."
	     		actionName="system_systemCustEventSignReadingRuleAction"
	     		dataList="${custEventNature}"
	     		targetId="custServEventKindId"
	     		value="${signReadingRuleVO.custEventNatureId }"
	     		isUnited="true"
	     		>
	     	</pms:unitedSelect>
			</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">事件类型：</td>
            <td class="aux_intable_td2">
            <pms:unitedSelect
	     		id="custServEventKindId"
	     		optionLabel="name"
	     		optionValue="keyword"
	     		name="custServEventKindId"
	     		selectText="请选择.."
	     		value="${signReadingRuleVO.custServEventKindId }"
	     		dataList="${custServEventKind}" >
	     	</pms:unitedSelect>
	     	</td>
          </tr>
          <tr>
            <td class="aux_intable_td1">紧急程度：</td>
            <td class="aux_intable_td2">
			<pms:unitedSelect
	     		id="emergencyDegreeId"
	     		name="emergencyDegreeId"
	     		optionLabel="name"
	     		optionValue="keyword"
	     		selectText="请选择..."
	     		value="${signReadingRuleVO.emergencyDegreeId }"
	     		dataList="${emergencyDegree}"
	     		>
	     	</pms:unitedSelect>
			</td>
          </tr>
      </table>
	  </td>
        </tr>
      </table>	 
	 </td>
  </tr>  
    </table></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2" class="window_footer">      <table border="0" cellspacing="0" cellpadding="0">
        <tr>
		<td>
		<c:if test="${signReadingRuleVO.keyword ==null}">
		<table border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="buttonOffLeft" id="btn1_41"></td>
            <td class="buttonOffMiddle" id="btn1_42" onClick="javascript:submitFun(false);" onMouseOver="btn_change_over(4)" onMouseOut="btn_change_out(4)" onblur="btn_change(4)"><img src="${ctx}/images/ico_saveandnewfile.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 保存并新增</td>
            <td class="buttonOffRight" id="btn1_43"></td>
          </tr>
        </table>
        </c:if>
        </td>
        <td class="btn_between_space">&nbsp;</td>
		  <td><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td class="buttonOffLeft" id="btn1_21"></td>
                <td class="buttonOffMiddle" id="btn1_22" onClick="javascript:submitFun(true);" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onBlur="btn_change(2)"><img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 保 存</td>
                <td class="buttonOffRight" id="btn1_23"></td>
              </tr>
          </table></td>
          <td class="btn_between_space"></td>
          <td><table border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td class="buttonOffLeft" id="btn1_31"></td>
                <td class="buttonOffMiddle" id="btn1_32" onClick="javascript:closeWinAndRefresh();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)" onBlur="btn_change(3)"><img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 关 闭</td>
                <td class="buttonOffRight" id="btn1_33"></td>
              </tr>
          </table></td>
        </tr>
          </table>
      <p>&nbsp;</p></td>
  </tr>
</table>

</form>
</body>
</html>
